xen.git
20 years agoAppend the new device config to our internal structure, in device_create. This
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 12:14:38 +0000 (13:14 +0100)]
Append the new device config to our internal structure, in device_create.  This
will preserve the new device config across migration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoCatch RuntimeError inside initDomain, for better handling of out-of-memory, etc.
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 12:13:57 +0000 (13:13 +0100)]
Catch RuntimeError inside initDomain, for better handling of out-of-memory, etc.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove last remaining use of scheduler.py, so we can remove the whole module.
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 12:12:09 +0000 (13:12 +0100)]
Remove last remaining use of scheduler.py, so we can remove the whole module.
It's not worth a whole module to save us 8 characters of typing to start a
timer.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDowngrade debug message to level "trace".
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 12:09:45 +0000 (13:09 +0100)]
Downgrade debug message to level "trace".

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded another test. Fix the existing tests to close the written config file
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 12:03:45 +0000 (13:03 +0100)]
Added another test.  Fix the existing tests to close the written config file
before running the test upon it, to ensure that the file is flushed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded reset method to Opts so that create.parseCommandLine can be used more than
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 12:00:36 +0000 (13:00 +0100)]
Added reset method to Opts so that create.parseCommandLine can be used more than
once.  This makes it possible to unit test this code.  Remove the odd aliasing
of gopts to opts inside parseCommandLine.

Rename local variables globals and locals inside opts.load -- these are built-in
functions.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove whole piles of cruft from the connection layer. The only thing that was
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 11:55:51 +0000 (12:55 +0100)]
Remove whole piles of cruft from the connection layer.  The only thing that was
using connectionMade, connectionLost, startedConnecting, clientConnectionLost,
and clientConnectionFailed was the test classes (TestClientFactory,
TestClientProtocol, TestServerFactory, TestServerProtocol), so they were
actually testing lots of code that no-one else was using.  All these classes
have gone, freeing up lots of cruft around.

The useless classes Factory, ServerFactory, ClientFactory, RelocationFactory,
UnixServerConnection, and TCPServerConnection have gone, in favour of passing
the Protocol class directly to SocketListener, and using SocketServerConnection
directly.

connectTransport has gone, in favour of overriding connect directly.

Piles of closedown cruft has gone, as this was only supporting the correct
output of connectionLost events, none of which we need.

Unused SocketServerConnection.{getHost,getPeer} have gone.

Mark some parameters in relocate as unused.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded method so that SrvDaemon can be run in the foreground without all the
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 11:44:43 +0000 (12:44 +0100)]
Added method so that SrvDaemon can be run in the foreground without all the
forking implied by the start method.  This makes it easier to run valgrind
against Xend, or run it with a pydebug-compiled Python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix typo, and failure to unpack singleton tuple correctly.
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 11:42:47 +0000 (12:42 +0100)]
Fix typo, and failure to unpack singleton tuple correctly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded unit test for the DevController subclasses.
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 11:41:39 +0000 (12:41 +0100)]
Added unit test for the DevController subclasses.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange the module registration declarations and change the object creation and
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 11:40:02 +0000 (12:40 +0100)]
Change the module registration declarations and change the object creation and
deallocation to match those in the Python/C tutorial.  This has been done to
make the interface here more conventional, in the hunt for bug #411.  One
double deallocation has been fixed, but this would only occur if we failed to
create the connection to Xenstore, and so unfortunately is not the cause of
that bug.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove all unnecessary uses of keyword arguments, to reduce complexity. In
emellor@leeni.uk.xensource.com [Mon, 21 Nov 2005 11:34:37 +0000 (12:34 +0100)]
Remove all unnecessary uses of keyword arguments, to reduce complexity.  In
many places we were supporting keywords for calling the methods here, and never
using that feature (especially where all the arguments were compulsory anyway)
and in some places we were even accepting positional and keyword arguments, and
not actually taking any arguments to the method at all!

Fix the permission parsing string in xspy_set_permissions -- this would have
blown up horribly if anyone were actually calling this code.

Fix the documentation comments to include the transaction handle throughout.

Have the self parameter to all the methods be an XsHandle, not a PyObject, to
avoid casting.

Remove unused pyvalue_int and pyvalue_str.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoThe patch allows one to configure NR_CPUS >8 (16 by default, same as the
kaf24@firebug.cl.cam.ac.uk [Sat, 19 Nov 2005 09:37:14 +0000 (10:37 +0100)]
The patch allows one to configure NR_CPUS >8 (16 by default, same as the
native) for x86_64 xenlinux. I tested 16-way xenolinux (using changeset
7892) on a 16-way SMP machine with >8GB memory. It worked fine as long
as I did sanity tests like kernel build (make -j64).

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoEnable the Xen hypervisor ACM security policy to be determined at boot
kaf24@firebug.cl.cam.ac.uk [Sat, 19 Nov 2005 09:35:38 +0000 (10:35 +0100)]
Enable the Xen hypervisor ACM security policy to be determined at boot
time (instead of at compile time). Allows a single xen.gz binary to
run under different security policy types, which simplifies
distributions considerably. To this end, we replace the current single
compile switch in Config.mk with the following two:

1. ACM_SECURITY (y/n) if "n", then the ACM is not compiled and no security
policies can be configured at boot time. If "y", then the ACM is compiled
and can be configured into any of the available policy types (null,
chwall, ste, chwall_ste) by specifying a valid boot policy .bin file in
the grub boot configuration.

2. ACM_DEFAULT_SECURITY_POLICY (null / chwall / ste / chwall_ste)
specifies the policy into which Xen defaults in the case that security is
enabled but no boot policy file is specified, or the specified policy file
is invalid (wrong version, magic, corrupted, ...)

While the type of the enabled policy (null, ste, ...) is decided once
during boot for the whole boot cycle, the policy instantiation can be
changed during operation as usual with the security tools.

Signed-off by: Tomas Lendacky <toml@us.ibm.com>
Signed-off by: Reiner Sailer <sailer@us.ibm.com>

20 years agoThis patch is to fix a few performance "bugs" in the xenmon.py script.
kaf24@firebug.cl.cam.ac.uk [Sat, 19 Nov 2005 09:29:28 +0000 (10:29 +0100)]
This patch is to fix a few performance "bugs" in the xenmon.py script.
No functionality is added or removed. Tested on x86/32 smp and x86/64.

Signed-off-by: Rob Gardner <rob.gardner@hp.com>
20 years agoFix shadow log-dirty mode for x86_64 xenlinux. Tested
kaf24@firebug.cl.cam.ac.uk [Sat, 19 Nov 2005 09:28:24 +0000 (10:28 +0100)]
Fix shadow log-dirty mode for x86_64 xenlinux. Tested
PAE xenlinux as well.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
20 years agoRevert 04a7decd0645b23f1f398340e927eb191f0e754d since it's not needed.
cl349@firebug.cl.cam.ac.uk [Sat, 19 Nov 2005 03:35:37 +0000 (04:35 +0100)]
Revert 04a7decd0645b23f1f398340e927eb191f0e754d since it's not needed.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoMove tpmfe.h file next to other xen specific header files.
cl349@firebug.cl.cam.ac.uk [Sat, 19 Nov 2005 01:27:20 +0000 (02:27 +0100)]
Move tpmfe.h file next to other xen specific header files.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
--HG--
rename : linux-2.6-xen-sparse/include/linux/tpmfe.h => linux-2.6-xen-sparse/include/asm-xen/tpmfe.h

20 years agoFix support for sxp domain configuration files.
cl349@firebug.cl.cam.ac.uk [Sat, 19 Nov 2005 00:59:43 +0000 (01:59 +0100)]
Fix support for sxp domain configuration files.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoOnly resume xenbus /after/ we've prepared our VCPUs; otherwise the
smh22@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 18:56:03 +0000 (19:56 +0100)]
Only resume xenbus /after/ we've prepared our VCPUs; otherwise the
VCPU hotplug callback can race with our vcpu_prepare.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoDo not allow an uninitialised VCPU to be brought up. Also
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 18:25:17 +0000 (19:25 +0100)]
Do not allow an uninitialised VCPU to be brought up. Also
check VCPUOP_up return code in the guest and BUG() on
failure.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe xentrace_format script doesn't work on x86/64. Python pads the input
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 16:54:23 +0000 (17:54 +0100)]
The xentrace_format script doesn't work on x86/64. Python pads the input
structure because the first field is 32 bits and the next is 64 bits,
whereas x86-32 doesn't pad. The quick fix is to read the cpu id
separately as a 32bit value, then read the rest of the trace record.
Here is a little patch that does that. Tested on x86/32 SMP and x86/64.

Signed-off-by: Rob Gardner <rob.gardner@hp.com>
20 years agomake_page_readonly() must flush unused kmaps when handling
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 16:50:25 +0000 (17:50 +0100)]
make_page_readonly() must flush unused kmaps when handling
a high-memory page. Otherwise stale writable mappings may
persist. This fixes a corner case for alloc_ldt (which can
vmalloc an LDT and hence use highmem pages).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoImprove make_page_readonly and make_page_writable:
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 16:42:45 +0000 (17:42 +0100)]
Improve make_page_readonly and make_page_writable:
 1. Use update_va_mapping where possible (much faster)
 2. If that fails, fall back to explicit pte update rather
    than using writable pagetables (very slow for singleton
    updates)

Also many x86/64 cleanups and fix to handle vmalloc space
correctly.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSimplify arbitrary_virt_to_phys, and fix the x86/64 version to mask
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 16:41:03 +0000 (17:41 +0100)]
Simplify arbitrary_virt_to_phys, and fix the x86/64 version to mask
out the NX bit.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 18 Nov 2005 15:32:04 +0000 (16:32 +0100)]
Merged.

20 years agoRemove one further reference to network_limit_help that I missed when merging.
emellor@leeni.uk.xensource.com [Fri, 18 Nov 2005 15:31:50 +0000 (16:31 +0100)]
Remove one further reference to network_limit_help that I missed when merging.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 18 Nov 2005 13:30:47 +0000 (14:30 +0100)]
Merged.

20 years agoRemove barbaric abuse of goto out of one nested block and into a previous one.
emellor@leeni.uk.xensource.com [Fri, 18 Nov 2005 13:28:38 +0000 (14:28 +0100)]
Remove barbaric abuse of goto out of one nested block and into a previous one.
Remove one other -- less barbaric but still horrible -- use of goto.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 18 Nov 2005 13:05:38 +0000 (14:05 +0100)]
Merged.

20 years agoFrom Ken Grant: Add per command help / make help match new man pages.
emellor@leeni.uk.xensource.com [Fri, 18 Nov 2005 13:04:53 +0000 (14:04 +0100)]
From Ken Grant: Add per command help / make help match new man pages.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDisable live relocation for PAE and x86/64. Currently it can
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 12:51:20 +0000 (13:51 +0100)]
Disable live relocation for PAE and x86/64. Currently it can
seriously harm Xen's health. Better to just disable it in the
tools until the outstanding issues are resolved.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove conditionally-compiled code for Linux 2.4.
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 12:46:18 +0000 (13:46 +0100)]
Remove conditionally-compiled code for Linux 2.4.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoMake test 15_create_smallmem pass mem=16M on the kernel command line.
dan@guaranine.beaverton.ibm.com [Fri, 18 Nov 2005 12:02:33 +0000 (13:02 +0100)]
Make test 15_create_smallmem pass mem=16M on the kernel command line.

20 years agoAdded a test to verify that devices come and go from block-list
dan@guaranine.beaverton.ibm.com [Fri, 18 Nov 2005 12:02:01 +0000 (13:02 +0100)]
Added a test to verify that devices come and go from block-list
as they are block-attach'd and block-detach'd.

20 years agoupdates to xmdomain.cfg.5 man page to document most used options, and
sean@dague.net [Fri, 18 Nov 2005 12:01:30 +0000 (13:01 +0100)]
updates to xmdomain.cfg.5 man page to document most used options, and
provide a basic template for examples

20 years agoAdd hping to the ramdisk. Also, do some very simple versioning.
dan@localhost.localdomain [Fri, 18 Nov 2005 12:00:13 +0000 (13:00 +0100)]
Add hping to the ramdisk.  Also, do some very simple versioning.
This is the first change to the ramdisk since v0.1.0.  So, we now build
the image as initrd-X.Y.img, and link initrd.img to it.  This lets us
have a few checks to make sure that people rebuild their ramdisks when
necessary.

20 years agotrivial add to .hgignore to ignore all the pulled content for xm-test's buildroot
sean@dague.net [Fri, 18 Nov 2005 11:58:38 +0000 (12:58 +0100)]
trivial add to .hgignore to ignore all the pulled content for xm-test's buildroot

20 years agoadded block device content, including finding a few more bugs in xen
sean@dague.net [Fri, 18 Nov 2005 11:58:16 +0000 (12:58 +0100)]
added block device content, including finding a few more bugs in xen

20 years agoSet up fully-virtualised RTC time zone default to local
kaf24@firebug.cl.cam.ac.uk [Fri, 18 Nov 2005 11:42:59 +0000 (12:42 +0100)]
Set up fully-virtualised RTC time zone default to local
time (not UTC).

Signed-off-by: Winston Wang <winston.l.wang@intel.com>
20 years agoInitialise the request ID in xs_talkv, to silence valgrind. We're not actually
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 19:25:47 +0000 (20:25 +0100)]
Initialise the request ID in xs_talkv, to silence valgrind.  We're not actually
using this value at the moment -- it's only there for use by future clients.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoInitialise the request ID in xs_talkv, to silence valgrind. We're not actually
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 19:20:44 +0000 (20:20 +0100)]
Initialise the request ID in xs_talkv, to silence valgrind.  We're not actually
using this value at the moment -- it's only there for use by future clients.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoSimplify the logic of each of the functions here, removing the many bizarre
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 19:17:50 +0000 (20:17 +0100)]
Simplify the logic of each of the functions here, removing the many bizarre
uses of goto that reduce down to return NULL in any case, breaking the common
code out for returning values based upon the success or failure of an
operation, and the common code that parses transaction and path parameters,
used by xspy_read, xspy_ls, and xspy_mkdir.  Break out also the common code
that removes a watch token from the XsHandle watches list.

Use bool rather than int for result values, where this matches the same use
by tools/xenstore/xs.c.

Added missing free in xspy_get_permissions.

Use PySequence_SetItem inside xs_watch, rather than Py_INCREF followed by
PyList_SetItem.  If there is no None entry in the watches list, the code goes
on to append to the list using PyList_Append, and that call takes its own
reference rather than stealing one like PyList_SetItem.  This means that we
were previously leaking a reference if the list was full and so PyList_Append
was necessary.

Use PySequence_SetItem rather than Py_INCREF/PyList_SetItem also where we are
using assigning Py_None into the list, for neatness.

Remove meaningless pipe from xspy_release_domain's arg_spec.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix race in blkfront resume path (watch thread could fire watch during the
smh22@firebug.cl.cam.ac.uk [Thu, 17 Nov 2005 13:56:50 +0000 (14:56 +0100)]
Fix race in blkfront resume path (watch thread could fire watch during the
(short-ish) time that we were in BLKIF_STATE_DISCONNECTED).

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoFix x86-64 build.
jrb44@plym.cl.cam.ac.uk [Thu, 17 Nov 2005 12:32:05 +0000 (13:32 +0100)]
Fix x86-64 build.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Thu, 17 Nov 2005 12:03:13 +0000 (13:03 +0100)]
merge

20 years agoFix event_pending() macro to match the assembly-language
kaf24@firebug.cl.cam.ac.uk [Thu, 17 Nov 2005 12:02:19 +0000 (13:02 +0100)]
Fix event_pending() macro to match the assembly-language
checks in entry.S. This will avoid a hard-to-debug loop
that we found ourselves in recently, involving
hypercall_preempt_check() spuriously returning TRUE, but
no event getting propagated to the guest (since mask != 0).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 11:59:58 +0000 (12:59 +0100)]
Merged.

20 years agoCorrect buffer->size at the same time as buffer->capacity when shrinking down a
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 11:59:12 +0000 (12:59 +0100)]
Correct buffer->size at the same time as buffer->capacity when shrinking down a
buffer that has grown beyond max_capacity.  This fixes a Xenconsoled segfault
that was caused by stomping around above the buffer's allocated region.  It
became possible to set the max_capacity with changeset 7431, and ever
since then we have been exposed to this bug.  It would most easily be triggered
by running a domain without a client attached to the console, so that the
max_capacity was reached more easily.

Closes bug #380.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoThe perdomain mapping area in Xen space requires more than
kaf24@firebug.cl.cam.ac.uk [Thu, 17 Nov 2005 11:52:42 +0000 (12:52 +0100)]
The perdomain mapping area in Xen space requires more than
one level-1 pagetable page on PAE and x86/64. Generalise
the existing code to allocate and map an appropriate number
of level-1 pagetable pages.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 11:12:57 +0000 (12:12 +0100)]
Merged.

20 years agoDocumentation: remove Twisted Matrix pre-req
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 11:10:08 +0000 (12:10 +0100)]
Documentation: remove Twisted Matrix pre-req

Twisted Matrix is no longer necessary for Xen.  Removed from the
pre-requisites listed in the user documentation.

Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
20 years agoUpdates to the xm-test README file.
dan@guaranine.beaverton.ibm.com [Thu, 17 Nov 2005 11:09:09 +0000 (12:09 +0100)]
Updates to the xm-test README file.

20 years agoThis patch explains network-* options in xm.1, including the bits that are
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 11:01:13 +0000 (12:01 +0100)]
This patch explains network-* options in xm.1, including the bits that are
currently not really working.

Signed off by: Sean Dague <sean@dague.net>

20 years agoUpdate 01_pause_basic test for new console behavior.
dan@guaranine.beaverton.ibm.com [Thu, 17 Nov 2005 10:58:36 +0000 (11:58 +0100)]
Update 01_pause_basic test for new console behavior.

20 years agoMake test 04_memset detect bug #380 and restart the console daemon.
dan@guaranine.beaverton.ibm.com [Thu, 17 Nov 2005 10:56:13 +0000 (11:56 +0100)]
Make test 04_memset detect bug #380 and restart the console daemon.
This should allow the rest of the tests to run without reporting
failure because this test killed the console system.

20 years agoHere's the patch for making the otherend_changed entrypoint
emellor@leeni.uk.xensource.com [Thu, 17 Nov 2005 10:54:52 +0000 (11:54 +0100)]
Here's the patch for making the otherend_changed entrypoint
optional.  The USB driver doesn't need this entrypoint because the state
machine driven by it is factored out of the driver code entirely into
xenidc.

Signed-off-by: Harry Butterworth butterwo@uk.ibm.com
20 years agoFix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly for
kaf24@firebug.cl.cam.ac.uk [Thu, 17 Nov 2005 10:47:49 +0000 (11:47 +0100)]
Fix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly for
4MB superpages (32-bit non-pae).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix pinning logic on restore.
smh22@firebug.cl.cam.ac.uk [Thu, 17 Nov 2005 09:10:52 +0000 (10:10 +0100)]
Fix pinning logic on restore.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 19:33:23 +0000 (20:33 +0100)]
Merged.

20 years agoTest for creating a domain with too little memory.
dan@guaranine.beaverton.ibm.com [Wed, 16 Nov 2005 19:33:12 +0000 (20:33 +0100)]
Test for creating a domain with too little memory.

20 years agoMake 01_reboot test more robust.
dan@guaranine.beaverton.ibm.com [Wed, 16 Nov 2005 19:32:36 +0000 (20:32 +0100)]
Make 01_reboot test more robust.
We need to attach a console before rebooting to make sure the domain did
actually boot in the first place.  Also, use a better method for pulling out
the uptime string.

20 years agoOne more try...
smh22@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 17:41:43 +0000 (18:41 +0100)]
One more try...

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoFix annoying error introduced during cleanup. Oops.
smh22@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 17:28:09 +0000 (18:28 +0100)]
Fix annoying error introduced during cleanup. Oops.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoTrivial fixes for 64bit and xend.
smh22@tempest.cl.cam.ac.uk [Wed, 16 Nov 2005 17:03:48 +0000 (18:03 +0100)]
Trivial fixes for 64bit and xend.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoMany fixes for save/restore and related areas for PAE in particular. Now
smh22@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 16:45:03 +0000 (17:45 +0100)]
Many fixes for save/restore and related areas for PAE in particular. Now
should be able to save/restore successfully on machines with up to 16GB
and any size of guest.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 14:50:36 +0000 (15:50 +0100)]
Merged.

20 years agoWatch for changes in the /vm section of the store, so that we update our
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 14:32:56 +0000 (15:32 +0100)]
Watch for changes in the /vm section of the store, so that we update our
internal state if the store is configured by an external tool.

We react properly to changes in name and on_{reboot,poweroff,crash}.  Reacting
correctly to vcpus, vcpu_avail, memory, and maxmem will come soon (those code
aspects are already under review).  cpu_weight and bootloader to be considered.

Removed unused and semantically invalid method XendDomainInfo.setDomid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded an unwatch method, so that XendDomainInfo can unregister the watch from
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 14:27:59 +0000 (15:27 +0100)]
Added an unwatch method, so that XendDomainInfo can unregister the watch from
outside the watch handler.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove the registration of the @releaseDomain watch so that we avoid a watch
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 14:27:11 +0000 (15:27 +0100)]
Move the registration of the @releaseDomain watch so that we avoid a watch
between the watch firing and the first call to refresh.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDowngrade the failure to change the iptables settings from fatal to an error.
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 14:25:22 +0000 (15:25 +0100)]
Downgrade the failure to change the iptables settings from fatal to an error.
Even though we are checking for a working iptables installation, it is still
possible that the user does not have the PHYSDEV matcher installed, so just
issue a diagnostic instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 12:38:16 +0000 (13:38 +0100)]
Merged.

20 years agoDom0 might not be called Domain-0, so ask for the name in shutdown.py, instead of...
jmb@artemis.home.pimb.org [Wed, 16 Nov 2005 12:34:52 +0000 (13:34 +0100)]
Dom0 might not be called Domain-0, so ask for the name in shutdown.py, instead of hardcoding it

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
20 years agoRename XENVER_parameters to slightly more informative
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 11:44:12 +0000 (12:44 +0100)]
Rename XENVER_parameters to slightly more informative
XENVER_platform_parameters.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 11:37:29 +0000 (12:37 +0100)]
Merged.

20 years agoReview checks for Error string when checking that bad arguments are handled
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 11:36:47 +0000 (12:36 +0100)]
Review checks for Error string when checking that bad arguments are handled
correctly.  Many checks were looking using output.find("Error") > 1, which is
incorrect, as we do not guarantee that the word "Error" will be first in the
output (never mind the fact that strings are indexed from 0).

All these checks have been changed to compare against -1.  In particular, this
should fix the failure of create_noparm_neg and create_badparm_neg on a machine
with the /etc/xen/xmdefconfig file in place, as xm create issues the
Using config file "/etc/xen/xmdefconfig" diagnostic before reporting the error.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix up start_info_t magic string to match the format of
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 11:23:17 +0000 (12:23 +0100)]
Fix up start_info_t magic string to match the format of
XENVER_capabilities strings.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis fixes the following scenerio:
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:41:14 +0000 (11:41 +0100)]
This fixes the following scenerio:
1) gmfn X is L2 table, and a shadow for it is set.
2) A write to page X, and the same page would be L1 table
also.(Something like the linear page table) But the shadow for L1 table
is not set.

The code path will be shadow_fault -> l1pte_write_fault. Because X is L2
table, so shadow_mark_va_out_of_sync is called , this function will
allocate a OO entry for this table, and set the writable_pl1e to -1.
Also it alloc a L1 shadow for X through shadow_map_l1_into_current_l2.
When allocating, free_out_of_sync_state will be called to free all OO
entry. However, since the OO entry allocated on
shadow_mark_va_out_of_sync has the writable_pl1e to -1, this OO entry
will never be released.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
20 years agoChange ISA_IO_BASE to fix_to_virt(FIX_ISAMAP_BEGIN). It used to be
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:39:38 +0000 (11:39 +0100)]
Change ISA_IO_BASE to fix_to_virt(FIX_ISAMAP_BEGIN).  It used to be
PAGE_OFFSET, which was unaltered from vanilla Linux 2.6.12.6 kernels
and caused isa_memcpy_fromio() to not read physical memory from
0xf0000 - 0xfffff correctly.

http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=393

Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
20 years agoRemove unnecessary cast of kmalloc() result.
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:35:26 +0000 (11:35 +0100)]
Remove unnecessary cast of kmalloc() result.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoAdd definitions of some swiotlb symbols to pci-dma.c.
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:34:54 +0000 (11:34 +0100)]
Add definitions of some swiotlb symbols to pci-dma.c.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years ago/dev/mem write function should use copy_from_user, not copy_to_user.
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:34:19 +0000 (11:34 +0100)]
/dev/mem write function should use copy_from_user, not copy_to_user.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agomerge.
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:33:13 +0000 (11:33 +0100)]
merge.

20 years agoCorrectly export xencons functions to avoid ugly 'extern'
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:32:19 +0000 (11:32 +0100)]
Correctly export xencons functions to avoid ugly 'extern'
declarations.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 10:32:14 +0000 (11:32 +0100)]
Merged.

20 years agoThe following patch removes every (hopefully) reference to network-limit.
emellor@leeni.uk.xensource.com [Wed, 16 Nov 2005 10:31:57 +0000 (11:31 +0100)]
The following patch removes every (hopefully) reference to network-limit.
Upon further investigation it sets Device parameters that don't exist any
longer, thus causing exceptions.  As it looks like this is completely
obsolete, and no one is actively working on it, we should just rip it out to
end the confusion.

Signed-off-by: Sean Dague <sean@dague.net>
20 years agoFix function that shouldn't be globally defined.
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:30:32 +0000 (11:30 +0100)]
Fix function that shouldn't be globally defined.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoTrivial coding style fix.
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:29:52 +0000 (11:29 +0100)]
Trivial coding style fix.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoAdd function declarations, and ensure we prevent mismatch
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:28:12 +0000 (11:28 +0100)]
Add function declarations, and ensure we prevent mismatch
of function definition vs. declaration.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoReplace 0 with NULL when assigning pointer fields/parameters.
kaf24@firebug.cl.cam.ac.uk [Wed, 16 Nov 2005 10:27:19 +0000 (11:27 +0100)]
Replace 0 with NULL when assigning pointer fields/parameters.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFix 64-bit build that I broke by making acpi table mapping
kaf24@firebug.cl.cam.ac.uk [Tue, 15 Nov 2005 18:46:48 +0000 (19:46 +0100)]
Fix 64-bit build that I broke by making acpi table mapping
fixup dependent on CONFIG_XEN_X86 (that only xen/i386
defines).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMake watchStart and watchMain global functions rather than classmethods,
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 18:19:02 +0000 (19:19 +0100)]
Make watchStart and watchMain global functions rather than classmethods,
meaning that we no longer need to prefix all the field accesses with cls.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 18:09:30 +0000 (19:09 +0100)]
Merged.

20 years agoHave a watch callback return 0 or 1 depending upon whether it would like to
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 18:08:11 +0000 (19:08 +0100)]
Have a watch callback return 0 or 1 depending upon whether it would like to
continue to receive watches.  This means that it is not necessary to probe
around in the xswatch internals to unregister a watch.

Tidy up the hotplug watch handling, moving the nested function out to a
separate place (I don't think that this was a problem in the end, but it was
making me nervous as I was debugging the recent race condition, and I find it
clearer out of the class in any case.  Pass an integer code representing
hotplug status, once it has been parsed from the store, as there are now a few
different places we can detect failure, and it's cleaner to pass a code from
those places.

Small tidy up to XendDomain, removing the unused releaseDomain field.

20 years agoRemove the handling of TypeError inside gather. It is not thrown by int()
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 17:47:39 +0000 (18:47 +0100)]
Remove the handling of TypeError inside gather.  It is not thrown by int()
when given a non-convertible value, as claimed by the comment, as the exception
ValueError is thrown in that situation.  TypeError is only thrown on int(None),
which cannot actually take place in this code, because of the explicit check
for None.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoEnsure we initialise the cpu_present_map before
kaf24@firebug.cl.cam.ac.uk [Tue, 15 Nov 2005 17:43:28 +0000 (18:43 +0100)]
Ensure we initialise the cpu_present_map before
topology_init() is called. In latest Linux kernels it
iterates over cpu_present_map rather than cpu_possible_map.

Also, save/restore should really iterate over
possible cpus, not present ones (not that it really matters,
but it's a small cleanup).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis patch fixes dom0 SMP vcpu hotplug. Currently, domains without
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 16:30:55 +0000 (17:30 +0100)]
This patch fixes dom0 SMP vcpu hotplug.  Currently, domains without
config files (e.g. dom0) don't set info['vcpus'] correctly resulting in
incorrect cpu availablity values in the store.  This prevents hotplug
from functioning.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoThis patch fixes a number of vcpu related issues.
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 16:28:05 +0000 (17:28 +0100)]
This patch fixes a number of vcpu related issues.

1.  xm vcpu-list now shows info for all vcpus by using
    info['max_vcpu_id']+1 as end of the range to query
    vcpu_info.
2.  Add new vcpu fields, online_vcpus, max_vcpu_id to
    XendDomainInfo.sxpr()
3.  Remove filter_cpump() which isn't needed now that
    the per vcpu cpumap field is correct.
4.  Update xm/main.py to use online_vcpus as the number
    vcpus to display in list.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 16:22:42 +0000 (17:22 +0100)]
Merged.

20 years agoFix race between xspy_read_watch and xspy_watch, by placing the watch in the
emellor@leeni.uk.xensource.com [Tue, 15 Nov 2005 16:22:04 +0000 (17:22 +0100)]
Fix race between xspy_read_watch and xspy_watch, by placing the watch in the
xshandle's list of watches *before* registering the watch with Xend.

Closes bug #392.

Signed-off-by: Ewan Mellor <ewan@xensource.com>